package com.thread.create;

/**
 *模拟龟兔赛跑
 * 1.创建多线程，继承thread类 +重写run
 *2.创建对象，运行run方法
 * @author jiangbang
 * @date 2016/6/16
 */
public class ThreadExtends01 extends Thread{

    @Override
    public void run() {
        for(int i=0;i<100;i++){
            System.out.println("兔子在跑"+i);
        }
    }

    public static void main(String[] args) {
        ThreadExtends01 rabbit = new ThreadExtends01();
        rabbit.start();
        for(int i=0;i<100;i++){
            System.out.println("main-->"+i);
        }
    }
}
